In a general image processing system including a scanner and printer, image data read from the scanner is transmitted across a local area network (LAN) or the Internet, and image data received from the LAN or Internet is printed by using the printer. Also, image data read from the scanner is transmitted by using a facsimile apparatus (FAX), and image data received via a modem is printed by using the printer. In this way, various image data transfer processes using networks and the like are performed in recent years.
Likewise, in the image processing system described above, data conversion is performed for various image formats such as a page description language (PDL), input image data from the scanner, output image data from the printer, FAX image data, and image data to be stored in an image database server, and data transfer is performed to input and output these image data.
When the processing performance of the image processing system which frequently transfers image data as described above is taken into consideration, constantly processing a large amount of image data is a large disadvantage. This is so because image data input from the scanner recently has a very large data amount, since the number of colors is increased to express color images, the number of bits is increased to represent tone, and the resolution is also increased as the image quality is improved.
To process input image data from the scanner in the image processing system, therefore, the general approach is to reduce the data amount of the image data by data compression, temporarily store the compressed data in a memory, and further process the stored data in the image processing system. Of various data compression methods, a JPEG compression process is standardized as a data compression technique which matches the characteristic features of scanner image data. Presently, this JPEG compression process is generally used as an optimal compression method for grayscale images.
To copy input image data from a scanner or transfer the data to a certain destination across a LAN or the like, the input image is generally once stored in a memory or the like. This is so because when image data is to be copied a plurality of number of times or transferred to a plurality of destinations, it is possible to save the user the trouble of scanning the image data a plurality of number of times corresponding to the copy quantity or the number of transfer destinations. When stored in the memory, the image data is compressed by the JPEG compression process.
Accordingly, the storage capacity of the memory for storing compressed image data must be determined on the assumption that image data compressed to some extent is input. When image processing is to be performed for compressed image data, or when image data is to be printed from a printing apparatus, the image processing or printing is executed after the compressed image data is expanded.
In a compression coding method using the JPEG compression process, however, the compression ratio changes in accordance with the contents of original image data. Therefore, compression coding is not always performed at a predicted compression ratio. Accordingly, if image data is coded by compression at a compression ratio lower than a predicted compression ratio and this compressed image data is stored in a memory, the storage capacity of the memory is exceeded, so the compressed image data cannot be entirely stored.
In this case, it is necessary to recompress the image data by changing the predicted compression ratio to obtain compressed image data within the storage capacity of the memory. The predicted compression ratio is changed and the image data compression process is repeated by resetting and scanning the original a number of times, until the data amount of the image data to be stored falls within the storage capacity of the memory. This is a very cumbersome operation for the user of the image processing system.
In general, therefore, a plurality of Q tables each having a predicted compression ratio are used to perform image data compression coding by the following method, and the compressed image data is stored in a memory. For example, compression is first performed using a Q table having a predicted compression ratio of 1/2. If the compression-coded image data exceeds the storage capacity of the memory, the image data is recompressed by using a Q table having a predicted compression ratio of 1/4. If the compression-coded image data exceeds the storage capacity of the memory again, the image data is compressed by using a Q table having a predicted compression ratio of 1/8. In this manner, compression coding is performed by using a plurality of Q tables having different predicted compression ratios, until the compression-coded image data becomes equal to or smaller than the storage capacity of the memory.
Unfortunately, the following problems arise when compression is performed a plurality of number of times by using the image data compression method as described above. First, when compression is to be performed by changing the predicted compression ratio, image data must be re-scanned by a scanner. This repetitive scanning operation prolongs the time required to process the job. For example, when image data is to be scanned page by page, repetitive scanning may not be a very cumbersome operation. However, when a large amount of originals are to be continuously scanned by using an automatic sheet feeder or the like, the user must reset these originals, and this requires much labor of the user.
Second, it is sometimes necessary to prepare a plurality of Q tables in order to quantize image data. This increases the memory capacity for storing these Q tables. Also, the same Q tables as used in encoding must be used to decode image data, so a plurality of Q tables are required in the location of decoding. This also increases the memory capacity for storing the Q tables. Furthermore, compressing image data more than necessary lowers the image quality of the image data.